package edu.ucdavis.gwt.gis.client.toolbar.button;

import edu.ucdavis.gwt.gis.client.query.QueryToolSettings;
import edu.ucdavis.gwt.gis.client.resources.GadgetResources;
import edu.ucdavis.gwt.gis.client.toolbar.Toolbar;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.user.client.ui.Image;

public class QueryButton extends ToolbarItem {
		
	public QueryButton() {}
		
	@Override
	public Image getIcon() {
		return new Image(GadgetResources.INSTANCE.querymap());
	}

	@Override
	public void onAdd(Toolbar toolbar) {}

	@Override
	public void onClick(ClickEvent event) {
		QueryToolSettings.INSTANCE.center();
	}

	@Override
	public String getText() {
		return "Query Tool";
	}
}
